<template>
  <div :style="{ ...coreStyle.marginSame(8) }">
    <a-card>
      <a-form ref="cronJobFormQueryRef" :model="cronJobFormQueryModel" labelAlign="left" layout="vertical" :style="{ ...coreStyle.marginBottom(10) }">
        <a-row :gutter="16" v-show="!cronJobFormQueryVisible">
          <a-col :span="8">
            <a-form-item :style="{ ...coreStyle.marginBottom(-8) }">
              <a-input-search v-model:value="cronJobFormQueryModel.keySearchVo" placeholder="关键字搜索" :disabled="cronJobFormQuerySubmitting" @search="cronJobFormQuerySearch" />
            </a-form-item>
          </a-col>
          <a-col :span="16">
            <a-button type="link" :style="{ ...coreStyle.floatRight }" @click="cronJobFormQueryUpDown">
              展开
              <CoreIcon icon="akar-icons:chevron-down" :size="14" />
            </a-button>
          </a-col>
        </a-row>
        <a-row :gutter="16" v-show="cronJobFormQueryVisible">
          <a-col :span="8">
            <a-form-item>
              <a-input-search v-model:value="cronJobFormQueryModel.keySearchVo" placeholder="关键字搜索" :disabled="cronJobFormQuerySubmitting" @search="cronJobFormQuerySearch" />
            </a-form-item>
          </a-col>
          <a-col :span="16">
          </a-col>
          <a-col :span="8">
            <a-form-item label="任务名称">
              <a-input v-model:value="cronJobFormQueryModel.jobNameAndLike" placeholder="输入任务名称" />
            </a-form-item>
          </a-col>
          <a-col :span="8">
            <a-form-item label="任务分组">
              <a-input v-model:value="cronJobFormQueryModel.jobGroupingAndLike" placeholder="输入任务分组" />
            </a-form-item>
          </a-col>
          <a-col :span="8">
            <a-form-item label="Cron表达式">
              <a-input v-model:value="cronJobFormQueryModel.cronExpressionAndLike" placeholder="输入Cron表达式" />
            </a-form-item>
          </a-col>
          <a-col :span="8">
            <a-form-item label="任务类名">
              <a-input v-model:value="cronJobFormQueryModel.jobClassNameAndLike" placeholder="输入任务类名" />
            </a-form-item>
          </a-col>
          <a-col :span="8">
            <a-form-item label="任务参数">
              <a-input v-model:value="cronJobFormQueryModel.jobParamAndLike" placeholder="输入任务参数" />
            </a-form-item>
          </a-col>
          <a-col :span="8">
            <a-form-item label="任务状态">
              <a-input v-model:value="cronJobFormQueryModel.jobStatusAndLike" placeholder="输入任务状态" />
            </a-form-item>
          </a-col>
          <a-col :span="8">
            <a-form-item label="描述">
              <a-input v-model:value="cronJobFormQueryModel.descriptionAndLike" placeholder="输入描述" />
            </a-form-item>
          </a-col>
          <a-col :span="8">
            <a-form-item label="排序权重">
              <a-input-number v-model:value="cronJobFormQueryModel.weightOrder" :style="{ ...coreStyle.width('100%') }" />
            </a-form-item>
          </a-col>
          <a-col :span="8">
            <a-form-item label="版本号">
              <a-input-number v-model:value="cronJobFormQueryModel.versions" :style="{ ...coreStyle.width('100%') }" />
            </a-form-item>
          </a-col>
          <a-col :span="24">
            <a-space :style="{ ...coreStyle.floatRight }">
              <a-button @click="cronJobFormQueryReset">
                <CoreIcon icon="ant-design:clear-outlined" :size="14" />
                重置
              </a-button>
              <a-button type="primary" ghost :loading="cronJobFormQuerySubmitting" @click="cronJobFormQuerySearch">
                <CoreIcon icon="ant-design:search-outlined" :size="14" />
                查询
              </a-button>
              <a-button type="link" @click="cronJobFormQueryUpDown">
                收起
                <CoreIcon icon="akar-icons:chevron-up" :size="14" />
              </a-button>
            </a-space>
          </a-col>
        </a-row>
      </a-form>
      <a-space>
        <a-button type="primary" ghost @click="cronJobAdd">
          <CoreIcon icon="carbon:add-alt" :size="14" />
          新增
        </a-button>
        <a-button type="dashed" @click="cronJobUpdate" v-if="cronJobListSelectLength === 1">
          <CoreIcon icon="ri:brush-line" :size="14" />
          修改
        </a-button>
        <a-popconfirm title="确认删除？" placement="bottom" @confirm="cronJobDelete" v-if="cronJobListSelectLength > 0">
          <a-button type="dashed" danger>
            <CoreIcon icon="jam:delete" :size="14" />
            删除
          </a-button>
        </a-popconfirm>
        <a-button @click="cronJobDetailInfo" v-if="cronJobListSelectLength === 1">
          <CoreIcon icon="heroicons-outline:light-bulb" :size="14" />
          详情
        </a-button>
      </a-space>
      <a-space :style="{ ...coreStyle.floatRight }">
        <a-button type="link" shape="circle" @click="cronJobListGetDataSet">
          <CoreIcon icon="ci:refresh" :size="22" />
        </a-button>
      </a-space>
      <a-table
        rowKey="id"
        :columns="cronJobListColumns"
        :data-source="cronJobListDataSet"
        :loading="cronJobListLoading"
        :pagination="false"
        bordered
        :customRow="cronJobListCustomRow"
        :row-selection="{ fixed: true, selectedRowKeys: cronJobListSelectedRowKeys, onChange: cronJobListRowOnChange }"
        :scroll="{ x: '100%', y: 550 }"
        :style="{ ...coreStyle.marginTop(10) }"
      >
      </a-table>
      <a-pagination
        v-model:current="cronJobListDataPage"
        v-model:pageSize="cronJobListDataRows"
        :total="cronJobListDataCount"
        show-size-changer
        show-quick-jumper
        :page-size-options="[ ...coreStyle.antdPaginationPageSizeOptions ]"
        :show-total="(total, range) => coreStyle.antdPaginationShowTotal(total, range)"
        :style="{ ...coreStyle.marginTop(10), ...coreStyle.textAlignCenter }"
        @change="cronJobListPaginationChange"
        @showSizeChange="cronJobListPaginationShowSizeChange"
        v-if="cronJobListPaginationVisible"
      >
      </a-pagination>
      <p :style="{ ...coreStyle.marginTop(14), ...coreStyle.marginBottom(6), ...coreStyle.textAlignCenter }" v-if="!cronJobListPaginationVisible">
        {{ coreStyle.antdPaginationShowTotal(cronJobListDataCount) }}
      </p>
    </a-card>
    <a-drawer
      v-model:visible="cronJobEditDrawerVisible"
      title="编辑定时任务信息"
      placement="right"
      :closable="false"
      :width="'40%'"
      :header-style="{ ...coreStyle.antdDrawerHeader }"
      :body-style="{ ...coreStyle.margin(50, 0, 30, 0) }"
      @close="cronJobEditDrawerOnClose"
    >
      <a-form ref="cronJobFormRef" :model="cronJobFormModel" :rules="cronJobFormRules" labelAlign="left" layout="vertical">
        <a-row :gutter="16">
          <a-col :span="12">
            <a-form-item label="任务名称" name="jobName">
              <a-input v-model:value="cronJobFormModel.jobName" placeholder="输入任务名称" />
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="任务分组" name="jobGrouping">
              <a-input v-model:value="cronJobFormModel.jobGrouping" placeholder="输入任务分组" />
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="Cron表达式" name="cronExpression">
              <a-input v-model:value="cronJobFormModel.cronExpression" placeholder="输入Cron表达式" />
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="任务类名" name="jobClassName">
              <a-input v-model:value="cronJobFormModel.jobClassName" placeholder="输入任务类名" />
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="任务参数" name="jobParam">
              <a-input v-model:value="cronJobFormModel.jobParam" placeholder="输入任务参数" />
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="任务状态" name="jobStatus">
              <a-input v-model:value="cronJobFormModel.jobStatus" placeholder="输入任务状态" />
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="描述" name="description">
              <a-input v-model:value="cronJobFormModel.description" placeholder="输入描述" />
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="排序权重" name="weightOrder">
              <a-input-number v-model:value="cronJobFormModel.weightOrder" :style="{ ...coreStyle.width('100%') }" />
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="版本号" name="versions">
              <a-input-number v-model:value="cronJobFormModel.versions" :style="{ ...coreStyle.width('100%') }" />
            </a-form-item>
          </a-col>
        </a-row>
      </a-form>
      <div :style="{ ...coreStyle.antdDrawerFooter }">
        <a-space>
          <a-button @click="cronJobFormReset">
            <CoreIcon icon="ant-design:clear-outlined" :size="14" />
            重置
          </a-button>
          <a-button type="primary" ghost :loading="cronJobFormSaveSubmitting" @click="cronJobFormNextAdd">
            <CoreIcon icon="tabler:player-track-next" :size="14" />
            继续录入
          </a-button>
          <a-button type="primary" ghost :loading="cronJobFormSaveSubmitting" @click="cronJobFormSave">
            <CoreIcon icon="ant-design:save-outlined" :size="14" />
            保存
          </a-button>
        </a-space>
      </div>
    </a-drawer>
    <a-drawer
      v-model:visible="cronJobDetailDrawerVisible"
      title="定时任务详细信息"
      placement="right"
      :closable="false"
      :width="'40%'"
      :header-style="{ ...coreStyle.antdDrawerHeader }"
      :body-style="{ ...coreStyle.margin(50, 0, 30, 0) }"
    >
      <a-space direction="vertical" :size="20" :style="{ ...coreStyle.width('100%') }">
        <a-descriptions title="基础信息" :column="2" bordered>
          <a-descriptions-item label="任务名称" :span="1">{{ cronJobDetailModel.jobName }}</a-descriptions-item>
          <a-descriptions-item label="任务分组" :span="1">{{ cronJobDetailModel.jobGrouping }}</a-descriptions-item>
          <a-descriptions-item label="Cron表达式" :span="1">{{ cronJobDetailModel.cronExpression }}</a-descriptions-item>
          <a-descriptions-item label="任务类名" :span="1">{{ cronJobDetailModel.jobClassName }}</a-descriptions-item>
          <a-descriptions-item label="任务参数" :span="1">{{ cronJobDetailModel.jobParam }}</a-descriptions-item>
          <a-descriptions-item label="任务状态" :span="1">{{ cronJobDetailModel.jobStatus }}</a-descriptions-item>
          <a-descriptions-item label="描述" :span="1">{{ cronJobDetailModel.description }}</a-descriptions-item>
          <a-descriptions-item label="排序权重" :span="1">{{ cronJobDetailModel.weightOrder }}</a-descriptions-item>
          <a-descriptions-item label="版本号" :span="1">{{ cronJobDetailModel.versions }}</a-descriptions-item>
        </a-descriptions>
      </a-space>
      <div :style="{ ...coreStyle.antdDrawerFooter }">
        <a-space>
          <a-button type="dashed" @click="cronJobDetailUpdate">
            <CoreIcon icon="ri:brush-line" :size="14" />
            修改
          </a-button>
        </a-space>
      </div>
    </a-drawer>
  </div>
</template>

<script lang="ts">
import { Options, Vue } from 'vue-class-component'
import { mapStores } from 'pinia'
import { useCoreToolStore } from '/@/store/modules/cn/core/tool/coreToolStore'
import type { Res } from '/@/tool/Res'
import type { Param } from '/@/tool/Param'

import { useCronJobStore } from '/@/store/modules/cn/core/cron/cronJobStore'

import type { CronJob } from '/@/model/cn/core/cron/eo/CronJob'
import { toCronJob } from '/@/model/cn/core/cron/eo/CronJob'

import type { CronJobQO } from '/@/model/cn/core/cron/qo/CronJobQO'
import { toCronJobQO } from '/@/model/cn/core/cron/qo/CronJobQO'

import type { CronJobVO } from '/@/model/cn/core/cron/vo/CronJobVO'
import { toCronJobVO } from '/@/model/cn/core/cron/vo/CronJobVO'

@Options({
  name: 'CronJob',
  components: {
  },
  computed: {
    ...mapStores(useCoreToolStore, useCronJobStore),
  },
})
export default class CronJob extends Vue {

  cronJobListDataSet: Array<CronJobVO> = []

  cronJobListColumns: Array<object> = [
    {
      title: '任务名称',
      dataIndex: 'jobName',
      align: 'center',
      // ellipsis: true,
      // width: 200,
    },
    {
      title: '任务分组',
      dataIndex: 'jobGrouping',
      align: 'center',
      // ellipsis: true,
      // width: 200,
    },
    {
      title: 'Cron表达式',
      dataIndex: 'cronExpression',
      align: 'center',
      // ellipsis: true,
      // width: 200,
    },
    {
      title: '任务类名',
      dataIndex: 'jobClassName',
      align: 'center',
      // ellipsis: true,
      // width: 200,
    },
    {
      title: '任务参数',
      dataIndex: 'jobParam',
      align: 'center',
      // ellipsis: true,
      // width: 200,
    },
    {
      title: '任务状态',
      dataIndex: 'jobStatus',
      align: 'center',
      // ellipsis: true,
      // width: 200,
    },
    {
      title: '描述',
      dataIndex: 'description',
      align: 'center',
      // ellipsis: true,
      // width: 200,
    },
    {
      title: '排序权重',
      dataIndex: 'weightOrder',
      align: 'center',
      // ellipsis: true,
      // width: 200,
    },
    {
      title: '版本号',
      dataIndex: 'versions',
      align: 'center',
      // ellipsis: true,
      // width: 200,
    },
  ]

  cronJobListLoading: boolean = false

  cronJobListSelectedRowKeys: string[] = []

  cronJobListSelectData: Array<CronJobVO> = []

  cronJobListSelectLength: number = 0

  cronJobListSelectCurrentRowIndex: number = -1

  cronJobListSelectCurrentRowData: CronJobVO = toCronJobVO()

  cronJobListPaginationVisible: boolean = true

  cronJobListDataPage: number = 1

  cronJobListDataRows: number = 10

  cronJobListDataCount: number = 0

  cronJobListRowOnChange(selectedRowKeys, selectedRows) {
    this.cronJobListSelectedRowKeys = [ ...selectedRowKeys ]
    this.cronJobListSelectData = [ ...selectedRows ]
    this.cronJobListSelectLength = selectedRows.length
  }

  cronJobListCustomRow(record, index) {
    return {
      'class': index === this.cronJobListSelectCurrentRowIndex ? 'ant-table-row-selected' : '',
      onClick: (event) => {
        this.cronJobListSelectCurrentRowIndex = index
        this.cronJobListSelectCurrentRowData = { ...record }
        let selectedRowKeys = [ ...this.cronJobListSelectedRowKeys ]
        let selectedRows = [ ...this.cronJobListSelectData ]
        if (selectedRowKeys.includes(record.id)) {
          this.cronJobListRowOnChange([ ...selectedRowKeys.filter(eo => { return eo !== record.id }) ], [ ...selectedRows.filter(eo => { return eo.id !== record.id }) ])
        } else {
          selectedRowKeys.push(record.id)
          selectedRows.push(record)
          this.cronJobListRowOnChange([ ...new Set(selectedRowKeys) ], [ ...new Set(selectedRows) ])
        }
      },
      onDblclick: (event) => {
        this.cronJobStore.pkVo(this.$toParam<CronJobQO>({ id: this.cronJobListSelectCurrentRowData.id } as CronJobQO)).then((res: Res<CronJobVO>) => {
          if (res.succ) {
            this.cronJobDetailModel = { ...res.data[0] }
            this.cronJobDetailDrawerVisible = true
          } else {
            this.$message.error(res.msg, 6)
          }
        })
      },
    }
  }

  cronJobListGetDataSet() {
    this.cronJobListLoading = true
    this.cronJobListRowOnChange([], [])
    this.cronJobListSelectCurrentRowIndex = -1
    this.cronJobListSelectCurrentRowData = toCronJobVO()
    this.cronJobStore.pagingVo(this.$toParam<CronJobQO>([], this.cronJobListDataPage, this.cronJobListDataRows)).then((res: Res<CronJobVO>) => {
      if (res.succ) {
        this.cronJobListPaginationVisible = true
        this.cronJobListDataSet = [ ...res.data ]
        this.cronJobListDataCount = res.count
        setTimeout(() => { this.cronJobListLoading = false }, 500)
      } else {
        this.$message.error(res.msg, 6)
        setTimeout(() => { this.cronJobListLoading = false }, 500)
      }
    }).catch(err => {
      setTimeout(() => { this.cronJobListLoading = false }, 500)
    })
  }

  cronJobListPaginationChange() {
    this.cronJobListGetDataSet()
  }

  cronJobListPaginationShowSizeChange() {
    this.cronJobListGetDataSet()
  }

  cronJobFormQueryVisible: boolean = false

  cronJobFormQuerySubmitting: boolean = false

  cronJobFormQueryModel: CronJobQO = toCronJobQO()

  cronJobFormQueryUpDown() {
    this.cronJobFormQueryVisible = !this.cronJobFormQueryVisible
  }

  cronJobFormQueryReset() {
    if (this.$refs.cronJobFormQueryRef) {
      this.$refs.cronJobFormQueryRef.resetFields()
      this.cronJobFormQueryModel = toCronJobQO()
    }
  }

  cronJobFormQuerySearch() {
    this.cronJobFormQuerySubmitting = true
    this.cronJobListLoading = true
    this.cronJobListRowOnChange([], [])
    this.cronJobListSelectCurrentRowIndex = -1
    this.cronJobListSelectCurrentRowData = toCronJobVO()
    this.cronJobStore.queryVo(this.$toParam<CronJobQO>(this.$toSearch({ ...this.cronJobFormQueryModel }))).then((res: Res<CronJobVO>) => {
      if (res.succ) {
        this.cronJobListPaginationVisible = false
        this.cronJobListDataSet = [ ...res.data ]
        this.cronJobListDataCount = res.count
        setTimeout(() => { this.cronJobFormQuerySubmitting = false }, 5000)
        setTimeout(() => { this.cronJobListLoading = false }, 500)
      } else {
        this.$message.error(res.msg, 6)
        setTimeout(() => { this.cronJobFormQuerySubmitting = false }, 5000)
        setTimeout(() => { this.cronJobListLoading = false }, 500)
      }
    }).catch(err => {
      setTimeout(() => { this.cronJobFormQuerySubmitting = false }, 5000)
      setTimeout(() => { this.cronJobListLoading = false }, 500)
    })
  }

  cronJobEditDrawerVisible: boolean = false

  cronJobFormSaveSubmitting: boolean = false

  cronJobFormSaveContinue: boolean = false

  cronJobFormModel: CronJob = toCronJob()

  cronJobFormRules: object = {
    // jobName: [
    //   { type: 'string', required: true, message: '任务名称不能为空！', trigger: ['change', 'blur'] },
    // ],
    // jobGrouping: [
    //   { type: 'string', required: true, message: '任务分组不能为空！', trigger: ['change', 'blur'] },
    // ],
    // cronExpression: [
    //   { type: 'string', required: true, message: 'Cron表达式不能为空！', trigger: ['change', 'blur'] },
    // ],
    // jobClassName: [
    //   { type: 'string', required: true, message: '任务类名不能为空！', trigger: ['change', 'blur'] },
    // ],
    // jobParam: [
    //   { type: 'string', required: true, message: '任务参数不能为空！', trigger: ['change', 'blur'] },
    // ],
    // jobStatus: [
    //   { type: 'string', required: true, message: '任务状态不能为空！', trigger: ['change', 'blur'] },
    // ],
    // description: [
    //   { type: 'string', required: true, message: '描述不能为空！', trigger: ['change', 'blur'] },
    // ],
    // weightOrder: [
    //   { type: 'number', required: true, message: '排序权重不能为空！', trigger: ['change', 'blur'] },
    // ],
    // versions: [
    //   { type: 'number', required: true, message: '版本号不能为空！', trigger: ['change', 'blur'] },
    // ],
  }

  cronJobFormReset() {
    if (this.$refs.cronJobFormRef) {
      this.$refs.cronJobFormRef.resetFields()
      this.cronJobFormModel = toCronJob()
    }
  }

  cronJobFormSubmit() {
    this.cronJobFormSaveSubmitting = true
    this.$refs.cronJobFormRef.validate().then(() => {
      if (this.cronJobFormModel.id) {
        this.cronJobStore.update(this.$toParam<CronJob>(this.cronJobFormModel)).then((res: Res<CronJob>) => {
          if (res.succ) {
            this.$message.success(res.msg, 3)
            this.cronJobFormReset()
            this.cronJobFormSaveSubmitting = false
            if (!this.cronJobFormSaveContinue) {
              this.cronJobEditDrawerVisible = false
              this.cronJobListGetDataSet()
            }
          } else {
            this.$message.error(res.msg, 6)
            setTimeout(() => { this.cronJobFormSaveSubmitting = false }, 3000)
          }
        }).catch(err => {
          setTimeout(() => { this.cronJobFormSaveSubmitting = false }, 3000)
        })
      } else {
        this.cronJobStore.save(this.$toParam<CronJob>(this.cronJobFormModel)).then((res: Res<CronJob>) => {
          if (res.succ) {
            this.$message.success(res.msg, 3)
            this.cronJobFormReset()
            this.cronJobFormSaveSubmitting = false
            if (!this.cronJobFormSaveContinue) {
              this.cronJobEditDrawerVisible = false
              this.cronJobListGetDataSet()
            }
          } else {
            this.$message.error(res.msg, 6)
            setTimeout(() => { this.cronJobFormSaveSubmitting = false }, 3000)
          }
        }).catch(err => {
          setTimeout(() => { this.cronJobFormSaveSubmitting = false }, 3000)
        })
      }
    }).catch(() => {
      setTimeout(() => { this.cronJobFormSaveSubmitting = false }, 3000)
    })
  }

  cronJobFormSave() {
    this.cronJobFormSaveContinue = false
    this.cronJobFormSubmit()
  }

  cronJobFormNextAdd() {
    this.cronJobFormSaveContinue = true
    this.cronJobFormSubmit()
  }

  cronJobAdd() {
    if (this.cronJobFormModel.id) {
      this.cronJobFormReset()
    }
    this.cronJobEditDrawerVisible = true
  }

  cronJobUpdate() {
    this.cronJobStore.pk(this.$toParam<CronJobQO>({ id: this.cronJobListSelectData[0].id } as CronJobQO)).then((res: Res<CronJob>) => {
      if (res.succ) {
        this.cronJobFormReset()
        this.cronJobFormModel = { ...res.data[0] }
        this.cronJobEditDrawerVisible = true
      } else {
        this.$message.error(res.msg, 6)
      }
    })
  }

  cronJobEditDrawerOnClose() {
    if (this.cronJobFormSaveContinue) {
      this.cronJobFormSaveContinue = false
      this.cronJobListGetDataSet()
    }
  }

  cronJobDelete() {
    let param: Array<CronJob> = []
    this.cronJobListSelectData.forEach((eo: CronJobVO) => {
      param.push({ id: eo.id } as CronJob)
    })
    this.cronJobStore.removeBatch(this.$toParam<CronJob>(param)).then((res: Res<CronJob>) => {
      if (res.succ) {
        this.$message.success(res.msg, 3)
        this.cronJobListGetDataSet()
      } else {
        this.$message.error(res.msg, 6)
      }
    })
  }

  cronJobDetailDrawerVisible: boolean = false

  cronJobDetailModel: CronJobVO = toCronJobVO()

  cronJobDetailInfo() {
    this.cronJobStore.pkVo(this.$toParam<CronJobQO>({ id: this.cronJobListSelectData[0].id } as CronJobQO)).then((res: Res<CronJobVO>) => {
      if (res.succ) {
        this.cronJobDetailModel = { ...res.data[0] }
        this.cronJobDetailDrawerVisible = true
      } else {
        this.$message.error(res.msg, 6)
      }
    })
  }

  cronJobDetailUpdate() {
    this.cronJobStore.pk(this.$toParam<CronJobQO>({ id: this.cronJobDetailModel.id } as CronJobQO)).then((res: Res<CronJob>) => {
      if (res.succ) {
        this.cronJobFormReset()
        this.cronJobFormModel = { ...res.data[0] }
        this.cronJobDetailDrawerVisible = false
        this.cronJobEditDrawerVisible = true
      } else {
        this.$message.error(res.msg, 6)
      }
    })
  }

  mounted() {
    this.cronJobListGetDataSet()
  }

}
</script>

<style scoped lang="less">

</style>
